import request from '@/utils/request'
import defaultSettings from '@/settings'
import { praseStrEmpty } from '@/utils/ruoyi'

//批量代收业务回执报文查询
export const apiUrlConfigQuery = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/search`,
}

//批量代收业务回执报文查询明細表查询
export const apiUrlConfigQueryDetailTabSearch = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/detailTabSearch`,
}

//批量代收业务回执报文查询原交易查询
export const apiUrlConfigQueryOriDetailTab = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/oriTabSearch`,
}

// 批量代收业务回执报文查询明细
export function batchCollectionReceiptQueryDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/detail`,
    method: 'get',
    params:{retId:data.retId}
  })
}

// 批量代收业务付款人明细
export function batchCollectionReceiptQueryPayerDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/payerDetail`,
    method: 'get',
    params:{id:data.id}
  })
}

// 批量代收业务回执报文查询原交易明细
export function batchCollectionReceiptQueryOriDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptQuery/oriDetail`,
    method: 'get',
    params:{id:data.id,drct:data.drct}
  })
}



// 批量代收业务回执报文录入
export const apiUrlConfigEntry = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptEntry/search`,
}

// 批量代收业务回执报文录入明细table
export const apiUrlConfigEntryDetail = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptEntry/detailSearch`,
}
// export function batchCollectionReceiptEntryDetailSearch(id) {
//   return request({
//     url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptEntry/detailSearch?id=${id}`,
//     method: 'post',
//     data:{
//       current: 1,
//       limit: 20}
//   })
// }

// 批量代收业务回执报文录入明细
export function batchCollectionReceiptEntryDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptEntry/detail`,
    method: 'get',
    params:{id:data.id}
  })
}

// 批量代收业务回执报文录入
export function batchCollectionReceiptEntrySave(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/centralAgentPayInOut/batchCollectionAndPayment/BatchCollectionReceiptEntry/save`,
    method: 'post',
    data:data
  })
}
